import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-token'

export function getToken () {
  return Cookies.get(TokenKey)
}

export function setToken (token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken () {
  return Cookies.remove(TokenKey)
}
// 设置存储名
const Timekey = 'hrsass-token-timeout'
// 读取token时间戳
export function getTokenTime () {
  return Cookies.get(Timekey)
}
// 设置token时间戳
export function setTokenTime () {
  return Cookies.set(Timekey, Date.now())
}
